package com.guigu.service.impl;

import com.guigu.dto.SportseventsDTO;
import com.guigu.entity.Sportsevents;
import com.guigu.mapper.SportseventsMapper;
import com.guigu.service.SportseventsService;
import com.guigu.vo.SportseventsVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
@Service
@Transactional
public class SportseventsServicelmpl implements SportseventsService {
    @Autowired
    private SportseventsMapper spmapper;
    @Override
    public List<SportseventsVO> query(SportseventsDTO dto) {
        return this.spmapper.query(dto);
    }

    @Override
    public int add(Sportsevents sp) {
        return this.spmapper.add(sp);
    }

    @Override
    public Integer maxid() {
        return this.spmapper.maxid();
    }

    @Override
    public int update(Sportsevents sp) {
        return this.spmapper.update(sp);
    }

    @Override
    public int delete(int id) {
        return  this.spmapper.delete(id);
    }
}
